package net.csdn.business.common.domain.vo.bi;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserActivityEventsEnum {
    MERGE_CREATED(1, "created", "创建变更请求", ""),
    MERGE_CLOSED(3, "CLOSED", "关闭变更请求", ""),
    PUSHED(5, "push", "推送提交", ""),
    MERGE_APPROVE(7, "approve", "Review变更请求", ""),
    JOINED(8, "join", "邀请成员加入", ""),
    INIT_PROJECT(11, "init", "新建代码库", ""),
    IMPORT_PROJECT(12, "import", "库导入", ""),
    MERGE_MERGED(13, "merge", "合并代码", ""),
//    ENCRYPT(15, "encrypt", "加密代码", ""),
//    DECRYPT(16, "decrypt", "解密代码", ""),
    REPO_UPDATED(17, "repo_updated", "更新代码库设置", ""),
    DELETE_ORG(20, "delete_org", "删除组织", ""),
    ORG(21, "org", "创建组织", "CODE_EVENT_ORG"),
    ISSUE(22, "issue", "创建issue", "CODE_EVENT_ISSUE"),
    OPENSOURCE_VISIBILITY_LEVEL(23, "opensource_visibility_level", "库由私有变为公开", ""),
    RELEASES_UPDATED(24, "release_updated", "更新发行版", ""),
//    ADD_TEMPLATE_PROJECT(25,"add_template_project", "标记模板库", ""),
//    CANCEL_TEMPLATE_PROJECT(26,"cancel_template_project", "取消标记模板库", "")
    ;

    private int code;
    private String desc;
    private String descZn;
    private String tag;

    public static UserActivityEventsEnum byCode(int code){
        for(UserActivityEventsEnum eventsEnum : UserActivityEventsEnum.values()){
            if(code == eventsEnum.getCode()){
                return eventsEnum;
            }
        }
        return null;
    }
}
